package com.njworkorder.Mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.njworkorder.Entity.InspectionRegistration;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
* @author iron
* @description 针对表【inspection_registration】的数据库操作Mapper
* @createDate 2024-11-11 13:43:44
* @Entity com.njworkorder.Entity.InspectionRegistration
*/
public interface InspectionRegistrationMapper extends MPJBaseMapper<InspectionRegistration> {


    @Select("select ir.id,ir.weather,ir.temperature,ir.start_pile_num_up,ir.end_pile_num_up,ir.start_pile_num_down,ir.end_pile_num_down," +
            "ir.inspection_type,ir.inspection_start_time,ir.inspection_end_time,ir.inspection_mileage,ir.remark,ir.status,ir.publish_time," +
            "(select workspace_name from workspace where id = ir.workspace_id) as workspace_name " +
            "from inspection_registration as ir where ir.id = #{id}")
    Map<String, Object> getInspectionRegistrationById(String id);


}




